//******************************************************************************
// TITLE:                      	Overloading Operators 
// FILENAME:                   	main.cpp
// PREPARED FOR:               	CS215 Section CS13-02
// PROGRAMMER(S):              	Eric (Fox) Crowell
// DEVELOPMENT DATE:           	< 12/02/13 >
// COMPILER USED:      			Microsoft Visual Studio Ultimate 2013
// TARGET PLATFORM:         	Windows 8 x64
//================================================================
//                           PROJECT FILES
//		main.cpp
//		vector.h
//		vector.cpp
//
//================================================================

#include <iostream>
#include "vector.h"

using namespace std;

void main(){

	// 1) Declare Vectors
	Vector vec_A(1.0, 0.0, 0.0);
	Vector vec_B(0.0, 1.0, 0.0);
	Vector vec_C(0.0, 0.0, 1.0);
	cout << "1) Declared Vectors \n\n";

	// 2) Display Vectors
	cout << "2) Displaying Vectors \n";
	cout << "Vector A (A): " << vec_A << "\n";
	cout << "Vector B (B): " << vec_B << "\n";
	cout << "Vector C (C): " << vec_C << "\n\n";

	// 3) Display Dot Product of A and B
	cout << "3) Display Dot Product of A and B \n";
	cout << "A * B = " << (vec_A * vec_B) << "\n\n";
	// 4) Display Cross Product of A and B
	cout << "4) Display Cross Product of A and B \n";
	cout << "A ^ B = " << (vec_A ^ vec_B) << "\n\n";
	// 5) Display Cross Product of B and A
	cout << "5) Display Cross Product of B and A  \n";
	cout << "B ^ A = " << (vec_B ^ vec_A) << "\n\n";
	// 6) Assignment Statement
	cout << "6) A Assignment Statement \n";
	vec_A = vec_A * 3.27f;
	cout << "A = A * 3.27 = " << vec_A << "\n";
	cout << "A Magnitude = " << vec_A.magnitude() << "\n\n";
	// 7) Assignment Statement
	cout << "7) B Assignment Statement \n";
	vec_B = 4.5f + vec_B;
	cout << "B = 4.5 + B = " << vec_B << "\n";
	cout << "B Magnitude = " << vec_B.magnitude() << "\n\n";
	// 8) Assignment Statement
	cout << "8) C Assignment Statement \n";
	vec_C = vec_C - 1.36;
	cout << "C = C - 1.36 = " << vec_C << "\n";
	cout << "C Magnitude = " << vec_C.magnitude() << "\n\n";
	// 9) Declare Vector D
	cout << "9) Declare Vector D \n";
	Vector vec_D = vec_A - vec_B;
	cout << "Vector D (D): " << vec_D << "\n\n";
	// 10) Display A and B, ensure no values changed
	cout << "10) Display A and B, ensure no values changed \n";
	cout << "A: " << vec_A << ", B: " << vec_B << "\n\n";
	// 11) Declare Vector E
	cout << "11) Declare Vector E \n";
	Vector vec_E = vec_B + vec_C;
	cout << "Vector E (E): " << vec_E << "\n\n";
	// 12) Display B and C, ensure no values changed
	cout << "12) Display B and C, ensure no values changed \n";
	cout << "B: " << vec_B << ", C: " << vec_C << "\n\n";
	// 13) Display Dot Product of D and E
	cout << "13) Display Dot Product of D and E \n";
	cout << "D * E = " << (vec_D * vec_E) << "\n\n";
	// 14) Display D and E, ensure no values changed
	cout << "14) Display D and E, ensure no values changed \n";
	cout << "D: " << vec_D << ", E: " << vec_E << "\n\n";
	// 15) Display Cross Product of D and E
	cout << "15) Display Cross Product of D and E \n";
	cout << "D ^ E = " << (vec_D ^ vec_E) << "\n\n";
	// 16) Display D and E, ensure no values changed
	cout << "16) Display D and E, ensure no values changed \n";
	cout << "D: " << vec_D << ", E: " << vec_E << "\n\n";
	// 17) Perform the unary negation operator on vector E and then display it
	cout << "17) Perform the unary negation operator on vector E and then display it \n";
	vec_E = -vec_E;
	cout << "E: " << vec_E << "\n\n";
	// 18) Calculate and display the Unit vector for E
	cout << "18) Calculate and display the Unit vector for E \n";
	vec_E = vec_E / vec_E.magnitude();
	cout << "E: " << vec_E << "\n\n";
	// 19) Display result of A == B
	cout << "19) Display result of A == B \n";
	cout << "A == B results to " << ( (vec_A == vec_B) ? "true" : "false" ) << "\n\n";
	// 20) Display result of D < E
	cout << "20) Display result of D < E \n";
	cout << "D < E results to " << ( (vec_D < vec_E) ? "true" : "false") << "\n\n";
	// 21) Perform the cascaded assignment A = B = C = Vector(1.5, 2.5, 3.5) and display the vectors
	cout << "21) Perform the cascaded assignment A = B = C = Vector(1.5, 2.5, 3.5) and display the vectors \n";
	vec_A = vec_B = vec_C = Vector(1.5, 2.5, 3.5);
	cout << "Vector A (A): " << vec_A << "\n";
	cout << "Vector B (B): " << vec_B << "\n";
	cout << "Vector C (C): " << vec_C << "\n\n";

}